/**
 * Generate time : 2011-05-12 5:25:20
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.cs.domain;

import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCSSystemSetting 生产文档设置
 * 
 */
public class ZMCSSystemSettingCS extends DaoEPBase {

	private String fdKeyId = " "; /* FD_KEY_ID */
	private String fdSystemModel = " "; /* 系统模式 */
	private String fdMiningType = " "; /* 矿区形式 */
	private String fdSystemName = " "; /* 系统名称 */
	private String fdVersion = " "; /* 版本号 */
	private Long fdMaxUser = new Long(0); /* 最大用户数 */
	private String fdEngineeringNo = " "; /* 工程编号  */
	private String fdEngineeringNoRule = " "; /* 工程编号规则  */
	private String fdWorkingfaceNo = " "; /* 工作面编号  */
	private String fdWorkingfaceNoRule = " "; /* 工作面编号规则  */
	private String fdRoadwayNo = " "; /* 巷道编号  */
	private String fdRoadwayNoRule = " "; /* 巷道编号规则  */
	private String fdOtherDesignNo = " "; /* 其他设计编号  */
	private String fdOtherDesignNoRule = " "; /* 其他设计编号规则  */
	
	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("FD_KEY_ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdSystemModel");
		eiColumn.setFieldLength(1);
		eiColumn.setDescName("系统模式");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMiningType");
		eiColumn.setFieldLength(1);
		eiColumn.setDescName("矿区形式");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdSystemName");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("系统名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdVersion");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("版本号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMaxUser");
		eiColumn.setType("N");
		eiColumn.setScaleLength(0);
		eiColumn.setFieldLength(38);
		eiColumn.setDescName("最大用户数");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEngineeringNo");
		eiColumn.setFieldLength(1);
		eiColumn.setDescName("工程编号");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdEngineeringNoRule");
		eiColumn.setFieldLength(100);
		eiColumn.setDescName("工程编号规则");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdWorkingfaceNo");
		eiColumn.setFieldLength(1);
		eiColumn.setDescName("工作面编号");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdWorkingfaceNoRule");
		eiColumn.setFieldLength(100);
		eiColumn.setDescName("工作面编号规则");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdRoadwayNo");
		eiColumn.setFieldLength(1);
		eiColumn.setDescName("巷道编号");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdRoadwayNoRule");
		eiColumn.setFieldLength(100);
		eiColumn.setDescName("巷道编号规则");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdOtherDesignNo");
		eiColumn.setFieldLength(1);
		eiColumn.setDescName("其他设计编号");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdOtherDesignNoRule");
		eiColumn.setFieldLength(100);
		eiColumn.setDescName("其他设计编号规则");
		eiMetadata.addMeta(eiColumn);
	}

	/**
	 * the constructor
	 */
	public ZMCSSystemSettingCS() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - FD_KEY_ID
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdSystemModel - 系统模式
	 * 
	 * @return the fdSystemModel
	 */
	public String getFdSystemModel() {
		return this.fdSystemModel;
	}

	/**
	 * set the fdSystemModel - 系统模式
	 */
	public void setFdSystemModel(String fdSystemModel) {
		this.fdSystemModel = fdSystemModel;
	}

	/**
	 * get the fdMiningType - 矿区形式
	 * 
	 * @return the fdMiningType
	 */
	public String getFdMiningType() {
		return this.fdMiningType;
	}

	/**
	 * set the fdMiningType - 矿区形式
	 */
	public void setFdMiningType(String fdMiningType) {
		this.fdMiningType = fdMiningType;
	}

	/**
	 * get the fdSystemName - 系统名称
	 * 
	 * @return the fdSystemName
	 */
	public String getFdSystemName() {
		return this.fdSystemName;
	}

	/**
	 * set the fdSystemName - 系统名称
	 */
	public void setFdSystemName(String fdSystemName) {
		this.fdSystemName = fdSystemName;
	}

	/**
	 * get the fdVersion - 版本号
	 * 
	 * @return the fdVersion
	 */
	public String getFdVersion() {
		return this.fdVersion;
	}

	/**
	 * set the fdVersion - 版本号
	 */
	public void setFdVersion(String fdVersion) {
		this.fdVersion = fdVersion;
	}

	/**
	 * get the fdMaxUser - 最大用户数
	 * 
	 * @return the fdMaxUser
	 */
	public Long getFdMaxUser() {
		return this.fdMaxUser;
	}

	/**
	 * set the fdMaxUser - 最大用户数
	 */
	public void setFdMaxUser(Long fdMaxUser) {
		this.fdMaxUser = fdMaxUser;
	}

	/**
	 * get the fdEngineeringNo - 工程编号
	 * 
	 * @return the fdEngineeringNo
	 */
	public String getFdEngineeringNo() {
		return this.fdEngineeringNo;
	}

	/**
	 * set the fdEngineeringNo - 工程编号
	 */
	public void setFdEngineeringNo(String fdEngineeringNo) {
		this.fdEngineeringNo = fdEngineeringNo;
	}

	/**
	 * get the fdEngineeringNoRule - 工程编号规则
	 * 
	 * @return the fdEngineeringNoRule
	 */
	public String getFdEngineeringNoRule() {
		return this.fdEngineeringNoRule;
	}

	/**
	 * set the fdEngineeringNoRule - 工程编号规则
	 */
	public void setFdEngineeringNoRule(String fdEngineeringNoRule) {
		this.fdEngineeringNoRule = fdEngineeringNoRule;
	}
	
	/**
	 * get the fdWorkingfaceNo - 工作面编号
	 * 
	 * @return the fdWorkingfaceNo
	 */
	public String getFdWorkingfaceNo() {
		return this.fdWorkingfaceNo;
	}

	/**
	 * set the fdWorkingfaceNo - 工作面编号
	 */
	public void setFdWorkingfaceNo(String fdWorkingfaceNo) {
		this.fdWorkingfaceNo = fdWorkingfaceNo;
	}

	/**
	 * get the fdWorkingfaceNoRule - 工作面编号规则
	 * 
	 * @return the fdWorkingfaceNoRule
	 */
	public String getFdWorkingfaceNoRule() {
		return this.fdWorkingfaceNoRule;
	}

	/**
	 * set the fdWorkingfaceNoRule - 工作面编号规则
	 */
	public void setFdWorkingfaceNoRule(String fdWorkingfaceNoRule) {
		this.fdWorkingfaceNoRule = fdWorkingfaceNoRule;
	}
	
	/**
	 * get the fdRoadwayNo - 巷道编号
	 * 
	 * @return the fdRoadwayNo
	 */
	public String getFdRoadwayNo() {
		return this.fdRoadwayNo;
	}

	/**
	 * set the fdRoadwayNo - 巷道编号
	 */
	public void setFdRoadwayNo(String fdRoadwayNo) {
		this.fdRoadwayNo = fdRoadwayNo;
	}

	/**
	 * get the fdRoadwayNoRule - 巷道编号规则
	 * 
	 * @return the fdRoadwayNoRule
	 */
	public String getFdRoadwayNoRule() {
		return this.fdRoadwayNoRule;
	}

	/**
	 * set the fdRoadwayNoRule - 巷道编号规则
	 */
	public void setFdRoadwayNoRule(String fdRoadwayNoRule) {
		this.fdRoadwayNoRule = fdRoadwayNoRule;
	}
	
	/**
	 * get the fdOtherDesignNo - 其他设计编号
	 * 
	 * @return the fdOtherDesignNo
	 */
	public String getFdOtherDesignNo() {
		return this.fdOtherDesignNo;
	}

	/**
	 * set the fdOtherDesignNo - 其他设计编号
	 */
	public void setFdOtherDesignNo(String fdOtherDesignNo) {
		this.fdOtherDesignNo = fdOtherDesignNo;
	}

	/**
	 * get the fdOtherDesignNoRule - 其他设计编号规则
	 * 
	 * @return the fdOtherDesignNoRule
	 */
	public String getFdOtherDesignNoRule() {
		return this.fdOtherDesignNoRule;
	}

	/**
	 * set the fdRoadwayNoRule - 其他设计编号规则
	 */
	public void setFdOtherDesignNoRule(String fdOtherDesignNoRule) {
		this.fdOtherDesignNoRule = fdOtherDesignNoRule;
	}
	
	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdSystemModel(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdSystemModel")), fdSystemModel));
		setFdMiningType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMiningType")), fdMiningType));
		setFdSystemName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdSystemName")), fdSystemName));
		setFdVersion(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdVersion")), fdVersion));
		setFdMaxUser(NumberUtils.toLong(StringUtils.toString(map.get("fdMaxUser")), fdMaxUser));
		setFdEngineeringNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEngineeringNo")), fdEngineeringNo));
		setFdEngineeringNoRule(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEngineeringNoRule")), fdEngineeringNoRule));
		setFdWorkingfaceNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdWorkingfaceNo")), fdWorkingfaceNo));
		setFdWorkingfaceNoRule(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdWorkingfaceNoRule")), fdWorkingfaceNoRule));
		setFdRoadwayNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRoadwayNo")), fdRoadwayNo));
		setFdRoadwayNoRule(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRoadwayNoRule")), fdRoadwayNoRule));
		setFdOtherDesignNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdOtherDesignNo")), fdOtherDesignNo));
		setFdOtherDesignNoRule(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdOtherDesignNoRule")), fdOtherDesignNoRule));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdSystemModel", StringUtils.toString(fdSystemModel, eiMetadata.getMeta("fdSystemModel")));
		map.put("fdMiningType", StringUtils.toString(fdMiningType, eiMetadata.getMeta("fdMiningType")));
		map.put("fdSystemName", StringUtils.toString(fdSystemName, eiMetadata.getMeta("fdSystemName")));
		map.put("fdVersion", StringUtils.toString(fdVersion, eiMetadata.getMeta("fdVersion")));
		map.put("fdMaxUser", StringUtils.toString(fdMaxUser, eiMetadata.getMeta("fdMaxUser")));
		map.put("fdEngineeringNo", StringUtils.toString(fdEngineeringNo, eiMetadata.getMeta("fdEngineeringNo")));
		map.put("fdEngineeringNoRule", StringUtils.toString(fdEngineeringNoRule, eiMetadata.getMeta("fdEngineeringNoRule")));
		map.put("fdWorkingfaceNo", StringUtils.toString(fdWorkingfaceNo, eiMetadata.getMeta("fdWorkingfaceNo")));
		map.put("fdWorkingfaceNoRule", StringUtils.toString(fdWorkingfaceNoRule, eiMetadata.getMeta("fdWorkingfaceNoRule")));
		map.put("fdRoadwayNo", StringUtils.toString(fdRoadwayNo, eiMetadata.getMeta("fdRoadwayNo")));
		map.put("fdRoadwayNoRule", StringUtils.toString(fdRoadwayNoRule, eiMetadata.getMeta("fdRoadwayNoRule")));
		map.put("fdOtherDesignNo", StringUtils.toString(fdOtherDesignNo, eiMetadata.getMeta("fdOtherDesignNo")));
		map.put("fdOtherDesignNoRule", StringUtils.toString(fdOtherDesignNoRule, eiMetadata.getMeta("fdOtherDesignNoRule")));
		
		return map;

	}
}